-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix wrong usage of https in the monolog.xml file #11168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I never use XML, so this is not easy for me ... but maybe the reason of the error is that neither the HTTP nor the HTTPS version of the monolog XSD file exists on symfony.com? 404 error -> http://symfony.com/schema/dic/monolog/monolog-1.0.xsd Maybe @xabbuh or @OskarStark can help us here. |
This could be the reason Javier, mixing such URLs does not result in invalid XML per definition. In the end the URL should work and this PR closed. Thank you for pointing this out @PaddyS 👌🏻 |
That's not the case, @javiereguiluz. Namespaces (the first, third, fifth, etc URL in Then, the XSD file (the second, forth, sixth, etc URL in $ns = $extension->getNamespace();
$path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); In short, the XML namespace is replaced by Thus:
These changes are however only made recently: symfony/symfony@95e90b8 It is not yet included in a release, so PR changing this in the docs was merged too quickly. Given it's about to be released in all versions, I would vote to close this PR. If we think it is a problem to have this bug in the docs for 2 weeks, we should merge this one and revert the merge of #11122 |
I am now wondering if the changes in the code don't have to be reverted as otherwise XML configs that were valid before will soon become invalid. |
That's not true. Previously, everything was http only. Now, https is also supported |
Thanks @wouterj for pointing out the commit, which is going to include Yet I am not quite familiar with how the versioning of the docs work here. |
Yeah, normally I would assume it should target 4.3. But for some reason the PR was merged into 3.4 in the code: symfony/symfony@95e90b8 In the docs, we try to follow Symfony's versions as close as possible |
Thanks for your PR btw! Unfortunately, I'm going to close it, but looking forward to other contributions from you! 😉 |
The
monolog.xml
examples mixup 'http' and https, which results in the XML configuration being invalid.The mixup results in the XmlFileLoader being unable to properly replace the URL with the actual local path, so he tries to load the actual URL, which is not available.
This also happened for the
services
.xsd - but since it's also available via URL, that's not an actual issue.Should I also change that?